<div class="choose-person-plugin" data-ng-controller="ChooseDepartCtrl">
    <div class="modal-head"><span class="mod-title">选择{{what1}}</span></div>
    <div class="choose-body choose-body-department">
        <div class="modal-search no-item">
            <div class="dem-item-wrap">
                <ul class="sel-dpm-item"></ul>
            </div>
            <div class="search-wrap">
              <span class="fadajing fa fa-search text-large"></span> 
              <input type="text" placeholder="搜索{{what1}}" onfocus="select()" data-ng-model="depQuery.kw" data-ng-keypress="checkSearchDep($event)"> 
              <a  href="javascript:;" class="chosePer-icon chosePer-close input-close" data-ng-if="depQuery.kw" data-ng-click="depQuery.kw = null">
                <i class="fa fa-times"></i>
              </a></div>
        </div>
        <div class="tree choose-department">
            <div class="chosePer-warning-p"><i class="chosePer-icon chosePer-warning"></i> <span class="ver-bottom">当前{{what1}}不可选择</span>
            </div>
            <span class="clearSearch" data-ng-if="isSearchDep" data-ng-click="cancelSearchDep()">清除搜索 <i class="fa fa-times"></i></span>
            <div>
                <ul>
                    <li ng-include="'app/plugins/choose-dep-page-node.html'"></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="modal-footer">
      <a href="javascript:void(0);" class="btn btn-primary" data-ng-click="OK()">确定</a>
      <a href="javascript:void(0);" class="btn btn-cancel" data-ng-click="doCancel()">取消</a>
    </div>
</div>
<script type="text/ng-template" id="app/plugins/choose-dep-page-node.html">
    <li data-ng-repeat="dep in departmentList">
      <div class="tree-item-content">
        <span class="chosePer-icon fa text-large" data-ng-class="{'fa-caret-down':dep.isOpen, 'fa-caret-right':!dep.isOpen,'cy-kongbai':dep.noChild}" data-ng-click="toggleDep(dep.de_wxid)"></span>
        <!-- <span class="chosePer-icon chosePer-checkBox" data-ng-class="{checked: dep.isChecked}"
            data-ng-click="selectDepartment(dep.de_wxid)"></span>  -->
        <div class="checkbox clip-check check-success no-margin inline" data-ng-click="selectDepartment(dep.de_wxid)">
            <input id="{{'checkBox'+dep.de_wxid}}" type="checkbox" data-ng-model="dep.isChecked" data-ng-checked="dep.isChecked">
            <label class="no-margin" for="checkAllBox"></label>
        </div>
        <span class="chosePer-icon fa fa-folder-open" data-ng-click="selectDepartment(dep.de_wxid)"></span>
        <span class="dpm-name" data-ng-bind="dep.de_name" data-ng-click="selectDepartment(dep.de_wxid)"></span>
      </div>
    <ul data-ng-class="{'collapse':!$parent.dep.isOpen}" ng-if="dep.sub.length" ng-init="departmentList=dep.sub" data-ng-include="'app/plugins/choose-dep-page-node.html'">
   </ul>
   </li>
</script>